package com.nmgolden.lanxin.model;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;

/**
 * 蓝信api响应体
 *
 * @author siger
 * @date 2020/12/21 5:35 下午 Wechat:Z2013111158
 */

@Data
public class LanxinResponse {
    private int errCode;
    private String errMsg;
    private JSON data;

    public LanxinResponse(String responseStr) {
        JSONObject json = JSON.parseObject(responseStr);
        this.errCode = json.getInteger("errCode");
        this.errMsg = json.getString("errMsg");
        this.data = (JSON) json.get("data");
    }
}